import request from "@/utils/request";

// 查询所有角色
export const queryAllRolesApi = () => request.get("/roles/list");

// 角色信息分页查询
export const queryPageApi = (params) =>
  request.get("/roles", { params: params });

// 添加角色
export const addRoleApi = (data) => request.post("/roles", data);

// 修改角色
export const updateRoleApi = (data) => request.put("/roles", data);

// 删除角色
export const deleteRoleApi = (id) => request.delete(`/roles/${id}`);

// 根据ID查询角色
export const getRoleByIdApi = (id) => request.get(`/roles/${id}`);
